#include "test_list.h"

#ifdef TEST_MASK_TO_REGEX

#define TEST_CASE_NAME os
#define TEST_NUMBER(n) Mask2Regex##_##n

#include <os/mask.h>

using namespace os;

#define TEST_MASK_TO_REGEX_000
#define TEST_MASK_TO_REGEX_001
#define TEST_MASK_TO_REGEX_002
#define TEST_MASK_TO_REGEX_003
#define TEST_MASK_TO_REGEX_004
#define TEST_MASK_TO_REGEX_005
#define TEST_MASK_TO_REGEX_006
#define TEST_MASK_TO_REGEX_007
#define TEST_MASK_TO_REGEX_008
#define TEST_MASK_TO_REGEX_009
#define TEST_MASK_TO_REGEX_010
#define TEST_MASK_TO_REGEX_011
#define TEST_MASK_TO_REGEX_012
#define TEST_MASK_TO_REGEX_013
#define TEST_MASK_TO_REGEX_014
#define TEST_MASK_TO_REGEX_015
#define TEST_MASK_TO_REGEX_016
#define TEST_MASK_TO_REGEX_017
#define TEST_MASK_TO_REGEX_018
#define TEST_MASK_TO_REGEX_019
#define TEST_MASK_TO_REGEX_020
#define TEST_MASK_TO_REGEX_021
#define TEST_MASK_TO_REGEX_022
#define TEST_MASK_TO_REGEX_023
#define TEST_MASK_TO_REGEX_024
#define TEST_MASK_TO_REGEX_025
#define TEST_MASK_TO_REGEX_026
#define TEST_MASK_TO_REGEX_027
#define TEST_MASK_TO_REGEX_028
#define TEST_MASK_TO_REGEX_029
#define TEST_MASK_TO_REGEX_030
#define TEST_MASK_TO_REGEX_031
#define TEST_MASK_TO_REGEX_032

//------------------------------------------------------------------------------------------------------//
namespace{


}//namespace
//------------------------------------------------------------------------------------------------------//

#ifdef TEST_MASK_TO_REGEX_000
TEST(TEST_CASE_NAME, TEST_NUMBER(000))
{
    const os::str mask   = "test";
    const os::str etalon = "^test$";
    const os::str result = Mask2Regex(mask);

    std::cout << "source: '" << mask   << "'\n";
    std::cout << "etalon: '" << etalon << "'\n";
    std::cout << "result: '" << result << "'\n";
    EXPECT_EQ(etalon, result);
}
#endif // TEST_MASK_TO_REGEX_000


#ifdef TEST_MASK_TO_REGEX_001
TEST(TEST_CASE_NAME, TEST_NUMBER(001))
{
    const os::str mask = "te*st";
    const os::str etalon = "^te.*st$";
    const os::str result = Mask2Regex(mask);

    std::cout << "source: '" << mask   << "'\n";
    std::cout << "etalon: '" << etalon << "'\n";
    std::cout << "result: '" << result << "'\n";
    EXPECT_EQ(etalon, result);
}
#endif // TEST_MASK_TO_REGEX_001

#ifdef TEST_MASK_TO_REGEX_002
TEST(TEST_CASE_NAME, TEST_NUMBER(002))
{
    const os::str mask   = "*.txt";
    const os::str etalon = "^.*\\.txt$";
    const os::str result = Mask2Regex(mask);

    std::cout << "source: '" << mask   << "'\n";
    std::cout << "etalon: '" << etalon << "'\n";
    std::cout << "result: '" << result << "'\n";
    EXPECT_EQ(etalon, result);
}
#endif // TEST_MASK_TO_REGEX_002

#ifdef TEST_MASK_TO_REGEX_003
TEST(TEST_CASE_NAME, TEST_NUMBER(003))
{
    const os::str mask   = "image*.png";
    const os::str etalon = "^image.*\\.png$";
    const os::str result = Mask2Regex(mask);

    std::cout << "source: '" << mask   << "'\n";
    std::cout << "etalon: '" << etalon << "'\n";
    std::cout << "result: '" << result << "'\n";
    EXPECT_EQ(etalon, result);
}
#endif // TEST_MASK_TO_REGEX_003

#ifdef TEST_MASK_TO_REGEX_004
TEST(TEST_CASE_NAME, TEST_NUMBER(004))
{
    const os::str mask   = "image*.p?g";
    const os::str etalon = "^image.*\\.p[^.]?g$";
    const os::str result = Mask2Regex(mask);

    std::cout << "source: '" << mask   << "'\n";
    std::cout << "etalon: '" << etalon << "'\n";
    std::cout << "result: '" << result << "'\n";
    EXPECT_EQ(etalon, result);
}
#endif // TEST_MASK_TO_REGEX_004

#ifdef TEST_MASK_TO_REGEX_005
TEST(TEST_CASE_NAME, TEST_NUMBER(005))
{
    const os::str mask   = "im?ge*.p?g";
    const os::str etalon = "^im.?ge.*\\.p[^.]?g$";
    const os::str result = Mask2Regex(mask);

    std::cout << "source: '" << mask   << "'\n";
    std::cout << "etalon: '" << etalon << "'\n";
    std::cout << "result: '" << result << "'\n";
    EXPECT_EQ(etalon, result);
}
#endif // TEST_MASK_TO_REGEX_005

#ifdef TEST_MASK_TO_REGEX_006
TEST(TEST_CASE_NAME, TEST_NUMBER(006))
{
    const os::str mask   = ".ignore";
    const os::str etalon = "^\\.ignore$";
    const os::str result = Mask2Regex(mask);

    std::cout << "source: '" << mask   << "'\n";
    std::cout << "etalon: '" << etalon << "'\n";
    std::cout << "result: '" << result << "'\n";
    EXPECT_EQ(etalon, result);
}
#endif // TEST_MASK_TO_REGEX_006

#ifdef TEST_MASK_TO_REGEX_007
TEST(TEST_CASE_NAME, TEST_NUMBER(007))
{
    const os::str mask   = ".ig*ore";
    const os::str etalon = "^\\.ig.*ore$";
    const os::str result = Mask2Regex(mask);

    std::cout << "source: '" << mask   << "'\n";
    std::cout << "etalon: '" << etalon << "'\n";
    std::cout << "result: '" << result << "'\n";
    EXPECT_EQ(etalon, result);
}
#endif // TEST_MASK_TO_REGEX_007


#ifdef TEST_MASK_TO_REGEX_008
TEST(TEST_CASE_NAME, TEST_NUMBER(008))
{
    const os::str mask   = "res.one.txt";
    const os::str etalon = "^res\\.one\\.txt$";
    const os::str result = Mask2Regex(mask);

    std::cout << "source: '" << mask   << "'\n";
    std::cout << "etalon: '" << etalon << "'\n";
    std::cout << "result: '" << result << "'\n";
    EXPECT_EQ(etalon, result);
}
#endif // TEST_MASK_TO_REGEX_008

#ifdef TEST_MASK_TO_REGEX_009
TEST(TEST_CASE_NAME, TEST_NUMBER(009))
{
    const os::str mask = "re*s.one.t*t";
    const os::str etalon = "^re.*s\\.one\\.t[^.]*t$";
    const os::str result = Mask2Regex(mask);

    std::cout << "source: '" << mask << "'\n";
    std::cout << "etalon: '" << etalon << "'\n";
    std::cout << "result: '" << result << "'\n";
    EXPECT_EQ(etalon, result);
}
#endif // TEST_MASK_TO_REGEX_009

#ifdef TEST_MASK_TO_REGEX_010
#endif // TEST_MASK_TO_REGEX_010

#ifdef TEST_MASK_TO_REGEX_011
#endif // TEST_MASK_TO_REGEX_011

#ifdef TEST_MASK_TO_REGEX_012
#endif // TEST_MASK_TO_REGEX_012

#ifdef TEST_MASK_TO_REGEX_013
#endif // TEST_MASK_TO_REGEX_013

#ifdef TEST_MASK_TO_REGEX_014
#endif // TEST_MASK_TO_REGEX_014

#ifdef TEST_MASK_TO_REGEX_015
#endif // TEST_MASK_TO_REGEX_015

#ifdef TEST_MASK_TO_REGEX_016
#endif // TEST_MASK_TO_REGEX_016

#ifdef TEST_MASK_TO_REGEX_017
#endif // TEST_MASK_TO_REGEX_017

#ifdef TEST_MASK_TO_REGEX_018
#endif // TEST_MASK_TO_REGEX_018

#ifdef TEST_MASK_TO_REGEX_019
#endif // TEST_MASK_TO_REGEX_019

#ifdef TEST_MASK_TO_REGEX_020
#endif // TEST_MASK_TO_REGEX_020

#ifdef TEST_MASK_TO_REGEX_021
#endif // TEST_MASK_TO_REGEX_021

#ifdef TEST_MASK_TO_REGEX_022
#endif // TEST_MASK_TO_REGEX_022

#ifdef TEST_MASK_TO_REGEX_023
#endif // TEST_MASK_TO_REGEX_023

#ifdef TEST_MASK_TO_REGEX_024
#endif // TEST_MASK_TO_REGEX_024

#ifdef TEST_MASK_TO_REGEX_025
#endif // TEST_MASK_TO_REGEX_025

#ifdef TEST_MASK_TO_REGEX_026
#endif // TEST_MASK_TO_REGEX_026

#ifdef TEST_MASK_TO_REGEX_027
#endif // TEST_MASK_TO_REGEX_027

#ifdef TEST_MASK_TO_REGEX_028
#endif // TEST_MASK_TO_REGEX_029

#ifdef TEST_MASK_TO_REGEX_030
#endif // TEST_MASK_TO_REGEX_030

#ifdef TEST_MASK_TO_REGEX_031
#endif // TEST_MASK_TO_REGEX_031

#ifdef TEST_MASK_TO_REGEX_032
#endif // TEST_MASK_TO_REGEX_032


#endif



